package com.origin.utils.gson

import com.google.gson.reflect.TypeToken
import java.lang.reflect.ParameterizedType
import java.lang.reflect.Type

abstract class TypeToken<T>{
    protected val type: Type = (javaClass.genericSuperclass as ParameterizedType).actualTypeArguments[0]
    companion object{
        inline fun <reified T>getType() = object : TypeToken<T>(){}.type
    }
}